package com.yanzhu.service.mapper;

import com.yanzhu.service.model.Templet;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @Author: 方炎柱
 * @Description:
 * @Date: Created in 19:43 2018/1/31
 * @Modified:
 */
@Mapper
public interface TempletMapper {
    @Insert("insert into templet(name, type, covers, music, video) values(#{name}, #{type}, #{covers}, #{music}, #{video})")
    int insert(Templet templet);

    @Select("select * from templet where id = #{id}")
    Templet queryTempletById(@Param("id") long id);

    @Select("select * from templet")
    List<Templet> queryTempletList();

    @Delete("delete from templet where id = #{id}")
    int deleteTempletById(@Param("id") long id);
}
